package model

import "errors"

var ErrNotFound = errors.New("Rows selectd is zero")
var ErrNotUpdated = errors.New("Rows affected by update is zero")
var ErrNotDeleted = errors.New("Rows affected by delete is zero")

var IsConstraintError = errors.New("Constraint failed")
var IsValidationError = errors.New("Validation failed")
var IsNotSingular = errors.New("Name is not singular")

type OrderRel struct {
	Adjustments []*OrderAdjustment `json:"adjustments"`
	Addresses   []*OrderAddress    `json:"addresses"`
	Discounts   []*OrderDiscount   `json:"discounts"`
	Items       []*OrderItem       `json:"items"`
	Logs        []*OrderOperateLog `json:"logs"`
	Payments    []*OrderPayment    `json:"payments"`
	Shipments   []*OrderShipment   `json:"shipments"`
	Refunds     []*OrderRefund     `json:"refunds"`
}

type AfterSaleRequestRel struct {
	Media       []*AttachmentRelationship `json:"media"`
	DelMediaIds []uint64                  `json:"delMediaIds"`
}
